package com.lookoutthebush.companyindex.controller;

import com.lookoutthebush.companyindex.dtos.UsersDTO;
import com.lookoutthebush.companyindex.util.UserManager;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

/**
 * @author Look
 * @date 2021/9/22 4:18 下午
 */
@Controller
@RequestMapping("adminfront")
@Slf4j
public class AdminfrontController {

    @GetMapping("index")
    public String index(Map<String, UsersDTO> res) {
        res.put("user", UserManager.getUser());
        return "adminfront/index";
    }

    @GetMapping("login")
    public String login() {
        return "adminfront/login";
    }

    @GetMapping("register")
    public String error() {
        return "adminfront/register";
    }
}
